package cn.falconnect.adserver.adapter.persistence.dao;

import java.util.List;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import cn.falconnect.adserver.domain.ad.AreaPlatformMap;

/**
 * area_platform_map表 dao
 * @author wangwei
 *
 */
@Component
public interface AreaPlatformMapDao {
	
//	@Results(value = { @Result(column = "id", property = "id", id = true),
//		@Result(column = "type", property = "type"),
//		@Result(column = "area_id", property = "defaultFlg"),
//		@Result(column = "platform_id", property = "cityLevel"),
//		@Result(column = "target_id", property = "isMajorCity"),
//	})
//	@Select("select * from area_platform_map where id = #{value}")
//	public AreaPlatformMap findById(long id);
	
	@Results(value = { @Result(column = "id", property = "id", id = true),
			@Result(column = "type", property = "type"),
			@Result(column = "area_id", property = "areaId"),
			@Result(column = "platform_id", property = "platformId"),
			@Result(column = "target_id", property = "targetId"),
		})
	@Select("select * from area_platform_map")
	public List<AreaPlatformMap> findAll();
	
}
